<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<input v-model="msg"  @keydown="writeMsg()"/>	
			<h2>{{msg}}</h2>
			<button @click="changeMsg()">修改msg的值</button>
		</div>
	</body>
	<script>
		var app=new Vue({
			el:"#app",
			data:{
				msg:""
			},
			methods:{
				changeMsg:function(){
					this.msg="修改了msg的值"
				}
				
			}
		})
	
	</script>
</html>
